# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-vfs-rar
pkgver=20.1.0
_realname=Nexus
pkgrel=1
pkgdesc="RAR VFS add-on for Kodi"
options="!check" # no test suite
url="https://github.com/xbmc/vfs.rar"
arch="x86_64 aarch64 armv7" # kodi is available only on these architectures
license="GPL-2.0-only"
makedepends="cmake kodi-dev samurai"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/xbmc/vfs.rar/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/vfs.rar-$pkgver-$_realname"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
01674c857c547eaa9042840d6558598fac0e95b3426d0ea9a8f4815dd40efcf3418e98025283de81281ddd5a5f1f1f52f0b35557c56a0862798d1e760a797e52  kodi-vfs-rar-20.1.0-Nexus.tar.gz
"
